<style>
.h-btm-bar {
  height: 50px;
}
</style>

<template>
  <view>
    <view class="h-btm-bar px-3 al-c">
      <span class="fz-15">我的收益：{{ userInfo.coin }}</span>

      <view class="ml-auto pos-r">
        <u-button type="primary" shape="circle">
          <span class="fw-b px-4">邀请好友</span>
        </u-button>
        <button class="pos-mask op-0" open-type="share"></button>
      </view>
    </view>
  </view>
</template>

<script>
import { mapState } from "vuex";

export default {
  props: {
    showPay: Boolean,
  },
  computed: {
    ...mapState(["userInfo"]),
    tasks() {
      const { email } = this.userInfo;
      const list = [
        {
          name: "绑定邮箱",
          coin: 10,
          done: !!email,
          link: "mine/mail",
          btn: "去绑定",
          icon: "mail",
        },
      ];
      return list;
    },
  },
  data() {
    return {
      showPop: false,
    };
  },
  mounted() {},
  methods: {
    onTask(it) {
      if (it.link) {
        this.$navTo(it.link);
      }
    },
    async onPay() {
      this.$navTo("user/buy", { from: "coin-log" });
    },
  },
};
</script>
